public class test519 {
    public static void main(String[] args) {
        int levels = 8; 
        for (int i = 1; i <= levels; i++) {
            for (int j = 1; j <= levels - i; j++) {
                System.out.print(" ");
            }
            int num = 1;
            for (int j = 1; j <= i; j++) {
                System.out.print(num + " ");
                num *= 2;
            }
            num /= 4; 
            for (int j = 1; j < i; j++) {
                System.out.print(num + " ");
                num /= 2;
            }
            System.out.println(); 
        }
    }
}

